Talmud for Moed Katan 1:2
רַבִּי אֶלְעָזָר בֶּן עֲזַרְיָה אוֹמֵר, אֵין עוֹשִׂין אֶת הָאַמָּה בַתְּחִלָּה בַּמּוֹעֵד וּבַשְּׁבִיעִית, וַחֲכָמִים אוֹמְרִים, עוֹשִׂין אֶת הָאַמָּה בַּתְּחִלָּה בַּשְּׁבִיעִית, וּמְתַקְּנִין אֶת הַמְּקֻלְקָלוֹת בַּמּוֹעֵד. וּמְתַקְּנִין אֶת קִלְקוּלֵי הַמַּיִם שֶׁבִּרְשׁוּת הָרַבִּים וְחוֹטְטִין אוֹתָן. וּמְתַקְּנִין אֶת הַדְּרָכִים וְאֶת הָרְחוֹבוֹת וְאֶת מִקְווֹת הַמַּיִם, וְעוֹשִׂין כָּל צָרְכֵי הָרַבִּים, וּמְצַיְּנִין אֶת הַקְּבָרוֹת, וְיוֹצְאִין אַף עַל הַכִּלְאָיִם:
R. Elazar b. Azaryah says: It is forbidden to make an amah [an irrigation ditch (so called because it is a cubit (amah) wide and a cubit high)] ab initio on Chol Hamoed [(If it were never there, it is not made ab initio on Chol Hamoed, for doing so entails undue exertion)], and on shevi'ith, [for it gives the impression that he is digging the soil on shevi'ith]. The sages say: An amah may be made ab initio on shevi'ith, and the defective ones may be repaired on Chol Hamoed [If soil fell in and impeded the flow, this may be corrected, but they (the amoth) may not be made ab initio on Chol Hamoed. The halachah is in accordance with the sages.], and water obstructions in [drinking troughs] in the public domain may be cleared and they (the troughs) may be cleansed [of pebbles, chips, and clods that fell therein.] And it is permitted to repair the roads, the thoroughfares, and the mikva'oth, and to tend to all public needs. And it is permitted to mark graves [They would crumble lime and spill it on the grave to serve as a sign to the passersby not to pass through a place of uncleanliness.], and they would also go out for kilayim. [Messengers of beth-din would go out to see if the fields had been sown with kilayim (forbidden admixtures) and to uproot them. For they received their wage from the lishkah contributions, and they could be hired cheap on Chol Hamoed, for they were idle then.]
Jerusalem Talmud Shekalim
Most of the activities permitted in the baraita are for the benefit of individuals, not the public, most clearly delivering a new pair of shoes on the semi-holiday, mentioned last in the baraita. The only reason for its inclusion here is the identity of the expression “public needs”, applied both to public works in preparation for the holiday and permitted activities during the intermediate days of an extended holiday. The following are the public needs: One judges civil suits, and capital crimes, and cases of flogging, and one redeems valuations56Fixed amounts dedicated to the Temple, Lev. 27:2–6., and bans57Dedications reserved for the Cohanim, Num. 18:14., and dedications58Dedications for the upkeep of the Temple, other than currency., one lets the suspected adulteress drink59Num. 5:11–31., and burns the Cow60Num. 19., and one breaks the neck of the calf whose neck was to be broken61For an unsolved murder case, Deut. 21:1–9., and one pierces the ear of a Hebrew slave62, and one purifies the sufferer from skin disease63, and removes the shoe from the block but one may not return it.”